modifier_combat_improve = class({})
require('abilities/modifiers/common_modifiers')
function modifier_combat_improve:OnCreated()
	self.armor_bonus = self:GetAbility():GetSpecialValueFor("armor_bonus")
	self.melee_attack_bonus = self:GetAbility():GetSpecialValueFor("melee_attack_bonus")
	self.ranged_attack_bonus = self:GetAbility():GetSpecialValueFor("melee_attack_bonus")
	common_modifiers:RegisterCommonModifier(self,false)

end
function modifier_combat_improve:DeclareFunctions()
    local funcs = {
        MODIFIER_PROPERTY_BASEATTACK_BONUSDAMAGE,
        MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS
    }
    return funcs
end
function modifier_combat_improve:GetModifierBaseAttack_BonusDamage()
	local ability = self:GetAbility()
	if  ability:GetCaster():GetAttackCapability() == DOTA_UNIT_CAP_MELEE_ATTACK then
		return self:GetStackCount() * self.melee_attack_bonus
	elseif self:GetAbility():GetCaster():GetAttackCapability() == DOTA_UNIT_CAP_RANGED_ATTACK then
		return self:GetStackCount() * self.ranged_attack_bonus
	end
end
function modifier_combat_improve:GetModifierPhysicalArmorBonus()
	return self:GetStackCount() * self.armor_bonus
end